home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00098_Misc movie scripts.ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  2.2 KB  |  92 lines

  1. on adjustregpoints dX, dY
  2.   repeat with X = 3 to 12
  3.     member(X, "bottles_g").regPoint = member(X, "bottles_g").regPoint + point(dX, dY)
  4.   end repeat
  5. end
  6.  
  7. on playTrack
  8.   global gSoundTrack, gCurrentSong, gFileSep, gSongList, gMusicChan, gMuted
  9.   if gMuted then
  10.     exit
  11.   end if
  12.   if inBonusMode() then
  13.     playBonusSound(gMusicChan, gSoundTrack)
  14.   else
  15.     gSoundTrack = getAt(gSongList, gCurrentSong)
  16.     soundPlayfile(gMusicChan, basePath() & "music" & gFileSep & gSoundTrack)
  17.   end if
  18. end
  19.  
  20. on importSound newSound
  21.   repeat with X = 1 to the number of castMembers of castLib "bonussound"
  22.     thisOne = member(X, "bonussound")
  23.     if thisOne.type = #sound then
  24.       if thisOne.fileName <> EMPTY then
  25.         put "Importing" && thisOne.name
  26.         oldName = thisOne.name
  27.         importFileInto(thisOne, thisOne.fileName)
  28.         thisOne.name = oldName
  29.       end if
  30.     end if
  31.   end repeat
  32. end
  33.  
  34. on setLevelCurrentSong
  35.   global gGameLevel, gSongList, gMode, gDemoVersion
  36.   case gGameLevel of
  37.     VOID, 0, 1:
  38.       if gDemoVersion then
  39.         thisList = ["groovy"]
  40.       else
  41.         thisList = ["groovy", "smash"]
  42.       end if
  43.     2:
  44.       if gDemoVersion then
  45.         thisList = ["samboni"]
  46.       else
  47.         thisList = ["mambo"]
  48.       end if
  49.     otherwise:
  50.       if gDemoVersion then
  51.         thisList = ["samboni"]
  52.       else
  53.         thisList = ["samboni", "funkey"]
  54.       end if
  55.   end case
  56.   currentSong(0, getOne(gSongList, randomFromList(thisList)))
  57.   playTrack()
  58. end
  59.  
  60. on currentSong delta, absolute
  61.   global gCurrentSong, gJukeHilight, gSongList, gCharacterSprites
  62.   oldSong = gCurrentSong
  63.   if voidp(gCurrentSong) then
  64.     gCurrentSong = 1
  65.   end if
  66.   maxSongs = count(gSongList)
  67.   if absolute then
  68.     gCurrentSong = max(1, min(absolute, maxSongs))
  69.   else
  70.     if delta < 0 then
  71.       if gCurrentSong > 1 then
  72.         gCurrentSong = gCurrentSong + delta
  73.       else
  74.         gCurrentSong = maxSongs
  75.       end if
  76.     else
  77.       if gCurrentSong < maxSongs then
  78.         gCurrentSong = gCurrentSong + delta
  79.       else
  80.         gCurrentSong = 1
  81.       end if
  82.     end if
  83.   end if
  84.   if oldSong <> gCurrentSong then
  85.     playTrack()
  86.   end if
  87.   repeat with X in gCharacterSprites
  88.     sendSprite(X, #musicCheck)
  89.   end repeat
  90.   sendSprite(gJukeHilight, #mMoveHilite)
  91. end
  92.